Troubleshooting
===============

This document presents general advice on 
troubleshooting HASP problems. Later sections will help you or your customers to solve specific problems that may occur. 

Although every effort has been made to ensure the highest level of 
quality and compatibility, HASP, like any other PC peripheral, 
might not operate on certain PC configurations, due to faulty 
equipment or improper installation.

In addition, since the HASP sits in a strategic position on the 
computer, it may be blamed for problems caused by other components 
of a specific PC configuration.

If a user reports a problem, it can usually be overcome by 
checking the following:

- Are the parallel card and the HASP key connected properly to the 
  parallel port?

- Is the PC infected by a virus which may be preventing the program 
  from running correctly?

- Does the same problem occur with another HASP? If not, then 
  replace the faulty key with a new one.

- Is a printer connected to the same port as the HASP? If so, does it 
  work properly? (Although this is a good sign, it does not 
  necessarily mean that the port or the printer are 100% sound.) 

- If HASP is connected to the same port as the printer, 
  disconnect the printer and check whether the HASP key works without 
  it. If there is a printing problem, try using another printer cable 
  and, if possible, another printer.

- If possible, try using (or installing) a second parallel port for 
  the HASP, to circumvent any problem caused by the printer. If this 
  is not possible, try replacing the original printer card.

- Try using the protected software on another PC of the same model.



Problems and Solutions
----------------------

Problem:	
--------
The HASP is connected but the protected application produces a "HASP 
not found" error.

Solution:	
---------
Although every effort has been made to ensure the highest level of 
communication, on rare occasions, a service might not be activated or 
transmitted well. We recommend you call the hasp() routine with a 
service several times before assuming the HASP is not connected. Take 
appropriate action only if the response is constantly invalid.


Problem:	
--------
The DOS Envelope utility can't be used to protect executable files 
which may be chained by other programs.

Solution:	
---------
This is especially true for the "chain" command in old BASIC 
compilers, as well as for the "execute" command in Turbo Pascal 
V 3.0. On the other hand, you can protect the main file (the file 
that performs the chaining) unless it is chained back.

Dont forget, if you can't use Envelope utility, you can still use 
the API (see chapter 6 of the "HASP Programmer's Guide").


Problem:	
--------
You get printer errors when trying to print from a protected Windows 
application. 

Solution:	
---------
This is due to a collision between printer access and HASP access.
To avoid collisions between HASP and other parallel devices (such as 
printers), you must install the HASP Device Driver. See chapter 14 
of the "HASP Programmer's Guide" for more information.


Problem:	
--------
You have a HASP connected to the printer and Windows warns that the 
printer is inaccessible or that there is a device conflict.

Solution:	
---------
1.  Select Main from the Program Manager.

2.  Select Control Panel.

3.  Select 386 Enhanced.

4.  Select LPT1 in the "Device Contention" frame and click Never Warn.

5.  Repeat step 4 for LPT2 and LPT3.

6.  Click OK.


Problem:	
--------
You try to use hinstall.exe to install the HASP Device Driver under 
Windows NT but get Error 9121. 

Solution:	
---------
If you try to activate hinstall under Windows NT but you don't have 
Administrator Privileges, you get Error 9121. You must have 
Administrator Privileges to install the HASP Device Driver under 
Windows NT.


Problem:	
--------
You try to activate a MemoHASP-protected application under Windows 
NT and Windows 95 but the application cant find the key. 

Solution:	
---------
Check the following:

- Make sure the HASP Device Driver is installed. 

- If the problem persists when the HASP Device Driver is installed, 
  run:
  
  hinstall -info

Hinstall displays the version number, installation date, and 
computer type. Contact your HASP dealer with details on the values 
of these parameters.


Problem:	
--------
Your MemoHASP-protected application is activated under Windows NT. 
You instruct your customer to install the HASP Device Driver by 
activating: 

  hinstall -i-is

Now, each time you restart the computer, it displays the following 
message: "HASP Loader Service unable to load the NetHASP License 
Manager." 

Solution:
---------	
By activating hinstall -i-is, you install the HASP Device Driver and 
also automatically load the NetHASP License Manager for Win32, 
nhsrvwnt.exe. Since you didn't copy nhsrvwnt.exe to the SYSTEM32 
directory, the loader service can't load the NetHASP License 
Manager automatically and thus displays the message.

There are two ways you can avoid this situation:

- Copy nhsrvwnt.exe to the SYSTEM32 directory.

- Alternatively, since you are using MemoHASP and not NetHASP, you 
  don't need the NetHASP License Manager. To disable automatic 
  loading of nhsrvwnt.exe activate:
 
  hinstall -rs


Problem:	
--------
Your 16-bit application is protected with NetHASP and the Envelope. 
Although not all the licenses are being used, additional users can't 
activate the application. They get a "too many users" error when 
they try. 

Solution:	
---------
A 16-bit application, protected with NetHASP and the Envelope only, 
does not perform a NetHASP LOGOUT. When such an application terminates, 
it remains listed in the Log Table, thus not releasing the license.

Use the API to perform the NetHASP LOGOUT to remove the application 
from the Log Table.


Problem:	
--------
You protected an application for both stand-alone PCs and 
network environments by using MemoHASP and NetHASP. Now you find 
that one station more than the number you have licensed can activate 
the application. 

Solution:	
---------
This happens because an application tries first to access the local 
port to find a MemoHASP. If the Developer Codes of your MemoHASP and 
NetHASP are the same, an application, activated from the station 
with the NetHASP connected, finds the local NetHASP. The 
application treats the local NetHASP as if it were a stand-alone key 
and does not record the activation in the NetHASP Log Table. 
Therefore, the application doesn't use a license.

If you want to avoid this situation, make sure the MemoHASP and 
NetHASP have different Developer Codes.


Problem:	
--------
Your NetHASP-protected Win32 application produces NetHASP 
LastStatus Error 1 when running under Win32s.

Solution:	
---------
Copy the appropriate HASP drivers to the application directory.
Copy hasput16.dll and hasput32.dll from the HASP software 
Drivers directory.


Problem:	
--------
Your NetHASP-protected Windows application returns NetHASP 
LastStatus Error 21.

Solution:	
---------
DOS extender and Windows applications require an average of 8 KB of
DOS memory. The NetHASP API requires 1 KB of DOS memory. NetHASP 
LastStatus Error 21 is issued when the amount of DOS memory is less 
than 1 KB and therefore insufficient for the NetHASP system. In such 
cases, not only NetHASP, but also other Windows applications are disabled.

To solve this problem, either remove some TSRs or exit some open 
Windows applications. You would use the same solution with any application 
that complains about insufficient DOS memory.


Problem:	
--------
Accessing the parallel port causes the computer to hang.

Solution:	
---------
Parallel ports of IBM PCs and compatibles are assigned to one of 
the following I/O ports: 3BCh, 378h, or 278h.

Network cards usually take up 10h or 20h I/O ports consecutively 
from their base address.

When the I/O port of a network card overlaps that of a parallel 
card, any access to the parallel port can cause the computer to 
hang. For example: printing, accessing software protection keys, and 
accessing peripherals connected to the parallel port may all cause 
the computer to hang.

It is therefore essential to avoid overlapping, by changing the I/O 
base of the network card. 

There are two ways to change a network cards I/O base:

- Some network cards let you assign the I/O base with jumpers. See 
  the card documentation for a description of which positions to 
  set the jumpers for a given I/O base.

- With newer cards, you can change the I/O base using the software 
  supplied with the cards. 


Problem:	
--------
Your application is running on a station that doesnt have network 
drivers loaded. The station hangs when the application performs a 
NetHASP LOGIN.

Solution:	
---------
This happens when the NetHASP Configuration File enables a specific 
protocol. The NetHASP system tries to use the specified 
protocol without checking if it is actually present. If the station 
doesn't have the protocol drivers installed, it hangs.

The solution is to delete the NetHASP Configuration File. If you need 
the NetHASP Configuration File, you must load the network drivers.


Problem:	
--------
Your NetHASP-protected application is running on a Windows for 
Workgroups station, in a Novell network, using IPX, and returns 
Error 3.

Solution:	
---------
The frame types are not the same in the net.cfg file and in the 
Windows network setup. Check the frame type in net.cfg and set the 
Windows frame type to be the same.

To set the frame types in Windows:

1. Choose Network Setup from the Control panel.

2. Double click IPX/SPX Compatible Transport with NetBIOS. 

3. Select Frame Type.

4. In the Value list box, select the frame type you want and 
   click Set.

5. Click OK.

6. Restart your computer.


Problem:
--------
Your application takes a long time to find the NetHASP key
on a large Novell Network.

Solution:
---------
Try using the address files.


Problem:
--------
Your application takes a long time to find the NetHASP key
on a large TCP/IP Network.

Solution:
---------
Try specifying the NetHASP key's IP address in the nethasp.ini file.


Problem:
--------
What should I do if I get Error 8 under TCPIP/IPX?

Solution:
---------
Error 8 means that the packet reached the License Manager, but the 
API did not receive an answer.  Try increasing the send-receive time 
in the nethasp.ini file to 4 seconds or more.


Problem:
--------
What should I do if I get Error 15 under TCPIP/IPX?

Solution:
---------
Error 15 under TCPIP/IPX only occurs when you work in the UDP mode.  
Error 15 means that a broadcast was made by the API, but no License 
Manager was found.  Try increasing the session time in the nethasp.ini 
file to 8 seconds.  Note that increasing the session time also increases the send-receive time by half the value of the session.


Problem:
--------
What should I do if I get Error 8 under NetBIOS?

Solution:
---------
Increase the send-receive time in the nethasp.ini file.


Problem:
--------
What should I do if I get NetHASP Error 2?

Solution:
---------
NetHASP Error 2 occurs only when the application runs under DOS or Windows for Workgroups.  Increase the number of possible sockets in Protocol IPXOdi section of the Novells client configuration file (net.cfg), set the IPX Sockets value to 32. 


Problem:
--------
I am using a NetHASP-5 key but only 3 users can login.

Solution:
---------
Use the HASPEDIT utility to check that the key definitely has 5 users listed
in the FAS Window.

Use the Monitor to see exactly who is logged in.

Problem:
--------
I attached two NetHASP-5 keys to one station, but only 5 users can Login.

Solution:
---------
Two NetHASP-5 keys do not always make 1 NetHASP-10. You cannot daisy chain
2 keys of the same code. 

Try to exchange the two NetHASP-5 keys for one NetHASP-10. If this is not 
possible - place each key on a separate station.



Summary
-------

Make sure you are using current HASP software versions. For the 
latest updates, contact your HASP dealer. 

If problems persist, check whether our sample and test programs 
work. Then fill in all the relevant details in the "HASP Problem 
Report" you received with your HASP Developer's Kit.




